Skip to content

Add Matrix desktop UI with a shared GTK runtime - #24

Merged
bytetroll merged 2 commits into
codex/niltest-colocatedfrom
codex/matrix-ui-foundation
Oct 29, 2026
Merged

bytetroll merged 2 commits into
codex/niltest-colocatedfrom
codex/matrix-ui-foundation

Conversation

@bytetroll

Copy link
Copy Markdown
Contributor

Add nil.std.ui, a desktop application library written in Matrix, with a shared optional GTK 4 provider for VM and native execution. Applications can create windows, rows/columns/grids, labels, buttons, entries and checkboxes, consume copied typed events, and synchronize text/flag models. The NIL² counter/settings example exercises a complete event loop, live bindings, layout and checked failures.

This PR is based on #23 and uses its compiler-integrated niltest suites. Pure model tests live beside the library; isolated display tests drive real keyboard input, activation and window-manager close requests. Resource tests inspect GTK's actual window registry across VM pauses, completion, faults, reset, reload and destruction, plus native context completion/restart and managed text collection.

The provider validates handles, parentage, UTF-8, bounds, thread ownership and its exact intrinsic ABI. The SDK uses the system GTK runtime on Linux and returns explanatory errors when the provider or display is unavailable. CI now installs the GTK/Xvfb dependencies so this desktop coverage runs in both LLVM configurations.

Writing the library exposed compiler issues addressed here:

  • Diagnose Matrix folded declaration collisions and shared cross-kind symbol conflicts at the declaration.
  • Support explicit then begin block … end block boundaries for nested conditionals inside consider arms; update grammar, guide and VS Code highlighting/folding/snippet support.
  • Preserve canonical generic types and checked assignment context for Option<Record> constructors on native routes, with paired Ny/Matrix six-route regressions.

Validation: Release build with LLVM 21; 538 applicable CTest checks passing (the grammar consistency check was rerun after adding the contextual word classification), with one optional PostgreSQL integration check skipped locally; 141 extension unit tests and 85 real extension-host checks. A copied development SDK validates 11 tools, 18 library modules and 63 documentation pages. Its desktop suites pass through VM/native execution. The sample application was also rendered and exercised on both routes.

The current UI scope is the documented Linux GTK 4 foundation. Declarative NILData views, richer widgets, menus/dialogs and additional OS providers remain follow-up work. Findings are recorded in matrix/docs/next-version-findings.md; NIL-0025 describes the architecture. NIL² is public generation presentation, separate from the numeric release identity in VERSION.

@bytetroll
bytetroll merged commit 0017a02 into codex/niltest-colocated Oct 29, 2026
6 checks passed
bytetroll added a commit that referenced this pull request Oct 30, 2026
PR #24 was merged into codex/niltest-colocated rather than master, so the
Matrix UI library and its compiler fixes stayed off the release branch while
PR #23 (niltest) landed on its own. This brings nilstd/src/ui and the
accompanying type-checker, parser and GTK runtime work onto master so the
sealed SDK packages nil.std.ui.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant